function Foo(name, age) {
  this.name = name;
  this.age = age;

  this.say = function () {
    console.log("hi~", this.name);
  };
}

let p1 = new Foo("xjh", 12);
let p2 = new Foo("xjh2", 10);

// console.log(p1.__proto__ === p2.__proto__); // true
// console.log(p1.__proto__ === p2.__proto__); // true
// console.log(p1.__proto__ === Foo.prototype); // true
// console.log(Foo.prototype.constructor == Foo); // true

Foo.prototype.h = 2;

// console.log(p1.h);
// console.log(p2.h);
